package org.car.world.service.impl;

import java.util.List;

import org.car.world.core.entily.ExpenseTable;
import org.car.world.core.mapper.ExpenseTableMapper;
import org.car.world.service.ExpenseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class ExpenseServiceImpl implements ExpenseService {

    @Autowired
    ExpenseTableMapper expenseTableMapper;

    @Override
    public int deleteByPrimaryKey(Integer expenseId) {
        return expenseTableMapper.deleteByPrimaryKey(expenseId);
    }

    @Override
    public int insert(ExpenseTable record) {
        return expenseTableMapper.insert(record);
    }

    @Override
    public ExpenseTable selectByPrimaryKey(Integer expenseId) {
        return expenseTableMapper.selectByPrimaryKey(expenseId);
    }

    @Override
    public List<ExpenseTable> selectAll() {
        return expenseTableMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(ExpenseTable record) {
        return expenseTableMapper.updateByPrimaryKey(record);
    }

}
